package com.gyhj.questionaires.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <h1>
 * 问卷调查实体类
 * </h1>
 *
 * @author MarkerCCC
 * @date 2020/4/14 - 15:10
 * @since 2020/4/14 - 15:10 星期二 by MarkerCCC markerccc@163.com
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("question_aires_entity")
@EqualsAndHashCode(callSuper = true)
public class QuestionAiresEntity extends Model<QuestionAiresEntity> {

    /**
     * id
     */
    private Long id;

    /**
     * 速度
     */
    @NotNull(message = "请选择解答的速度")
    @Max(value = 4, message = "请传入正确的状态码")
    @Min(value = 1, message = "请传入正确的状态码")
    private Integer speed;

    /**
     * 质量
     */
    @NotNull(message = "请选择解答的质量")
    @Max(value = 4, message = "请传入正确的状态码")
    @Min(value = 1, message = "请传入正确的状态码")
    private Integer quality;

    /**
     * 态度
     */
    @NotNull(message = "请选择服务的态度")
    @Max(value = 4, message = "请传入正确的状态码")
    @Min(value = 1, message = "请传入正确的状态码")
    private Integer attitude;

    /**
     * 综合评价
     */
    @NotNull(message = "请选择员工的评价")
    @Max(value = 5, message = "请传入正确的状态码")
    @Min(value = 1, message = "请传入正确的状态码")
    private Integer comprehensiveEvaluation;

    /**
     * 客户姓名
     */
    @NotBlank(message = "请输入您的名字")
    @Length(min = 1, max = 11, message = "姓名请保持在10个字符内")
    private String customerName;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    /**
     * 修改时间
     */
    private LocalDateTime modifiedTime;
}
